31/57

# hdfs.rmdir

Deletes a directory in HDFS.

Usage

    hdfs.rmdir(
            dfs.name,
            force)

Arguments

dfs.name

  Name of the directory in HDFS to delete. The directory can be an absolute path or relative to the current working directory.

force

  Controls whether a directory that contains files is deleted. Set to `TRUE` to delete the directory and all its files, or `FALSE` to cancel the operation (default).

Usage Notes

This function deletes all data objects stored in the directory, which invalidates all associated object identifiers in HDFS.

Return Value

`TRUE` if the directory is deleted successfully, or `FALSE` if the operation fails

Example

    R> hdfs.rmdir("mydata")
    [1] TRUE